package com.neusoft.mall.service.impl;

import com.neusoft.mall.model.Product;
import com.neusoft.mall.model.dao.ProductDao;
import com.neusoft.mall.service.IProductService;

import java.util.List;

public class ProductServiceImpl implements IProductService {
    private ProductDao dao = new ProductDao();
    @Override
    public List<Product> queryAll() {
        return dao.queryAll();
    }

    @Override
    public Product queryProById( Integer id ) {
        return dao.queryProById(id);
    }

    @Override
    public List<Product> queryProByName( String name ) {
        return dao.queryProByName(name);
    }

    @Override
    public Boolean delPro( Integer id ) {
        return dao.delPro(id);
    }

    @Override
    public void addPro( Product product ) {
        dao.addPro(product);
    }
}
